/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CoreWin.java
 *
 * Created on 12.06.2011, 21:06:59
 */
package gui;

import basic.CORE;

/**
 *
 * @author Freshman
 */
public class CoreWin extends javax.swing.JFrame {

    //Konstruktor
    public CoreWin() {
        setUndecorated(true);
        initComponents();
        setLocationRelativeTo(null);
        setVisible(true);
        CORE c = new CORE(this);
    }

    //Beginn des generierten Code
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bgnd = new javax.swing.JPanel();
        lLogo = new javax.swing.JLabel();
        lTitle1 = new javax.swing.JLabel();
        lTitle2 = new javax.swing.JLabel();
        pb = new javax.swing.JProgressBar();
        lStatus = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(589, 159));
        setResizable(false);

        bgnd.setBackground(new java.awt.Color(15, 30, 70));
        bgnd.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        bgnd.setForeground(new java.awt.Color(255, 255, 255));

        lLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pics/hclogo.png"))); // NOI18N

        lTitle1.setFont(new java.awt.Font("Lucida Console", 1, 24)); // NOI18N
        lTitle1.setForeground(new java.awt.Color(255, 255, 255));
        lTitle1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lTitle1.setText("HC-Connect");

        lTitle2.setFont(new java.awt.Font("Lucida Console", 1, 24)); // NOI18N
        lTitle2.setForeground(new java.awt.Color(255, 255, 255));
        lTitle2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        lTitle2.setText("Database Admin Utility");

        lStatus.setFont(new java.awt.Font("Lucida Console", 0, 18)); // NOI18N
        lStatus.setForeground(new java.awt.Color(255, 255, 255));
        lStatus.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lStatus.setText("LOADING");

        javax.swing.GroupLayout bgndLayout = new javax.swing.GroupLayout(bgnd);
        bgnd.setLayout(bgndLayout);
        bgndLayout.setHorizontalGroup(
            bgndLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bgndLayout.createSequentialGroup()
                .addComponent(lLogo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(bgndLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lTitle2, javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE)
                    .addComponent(lTitle1, javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE)))
            .addComponent(pb, javax.swing.GroupLayout.DEFAULT_SIZE, 583, Short.MAX_VALUE)
            .addComponent(lStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 583, Short.MAX_VALUE)
        );
        bgndLayout.setVerticalGroup(
            bgndLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bgndLayout.createSequentialGroup()
                .addGroup(bgndLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lLogo)
                    .addGroup(bgndLayout.createSequentialGroup()
                        .addComponent(lTitle1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lTitle2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pb, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(bgnd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(bgnd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    //Ende
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel bgnd;
    private javax.swing.JLabel lLogo;
    private javax.swing.JLabel lStatus;
    private javax.swing.JLabel lTitle1;
    private javax.swing.JLabel lTitle2;
    private javax.swing.JProgressBar pb;
    // End of variables declaration//GEN-END:variables
    
    //Hier beginnt der manuelle Code
    public void updateLoader(int value, String msg) {
        pb.setValue(value);
        lStatus.setText(msg);
    }
    //Ende
}
